package com.run.cat.dao.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author CG
 * @since 2020-08-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ct_comment")
public class Comment extends Model<Comment> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 动态id
     */
    @TableField("dynamic_id")
    private Long dynamicId;

    /**
     * 是否楼主 0 否 1 是
     */
    @TableField("is_publish")
    private Integer isPublish;

    /**
     * 评论记录父id
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 评论人id
     */
    @TableField("reply_id")
    private Long replyId;

    /**
     * 评论内容
     */
    @TableField("reply_comment")
    private String replyComment;

    /**
     * 评论时间
     */
    @TableField("reply_time")
    private Date replyTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
